<template>
  <div>
    <div>
      <div class="div_bargains">
        <span @click="span_bargains"><</span>
        <span>砍价列表</span>
        <span></span>
      </div>

      <div>
        <ul>
          <li
            v-for="(item, index) in bargainslist"
            :key="index"
            v-show="index <= 15 && index >= 9"
            class="li_box"
            @click="listedit(item)"
          >
            <img :src="item.pic" class="img_min" />
            <div class="div_max">
              <p class="p1">{{ item.name }}</p>
              <p>{{ item.characteristic }}</p>
              <ol class="ol_box">
                <li class="li_max">
                  <p class="p2">￥{{ item.minPrice }}</p>
                  <p>低价</p>
                </li>
                <li class="li_max">
                  <p>￥{{ item.originalPrice }}</p>
                  <p>原件</p>
                </li>
                <li class="li_max">
                  <p>{{ item.numberSells }}件</p>
                  <p>限量</p>
                </li>
              </ol>
            </div>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
export default {
    data() {
        return {
            bargainslist:[]
        }
    },
    mounted() {
        this.$APL.KANJIA().then(res=>{
            // console.log(res);
            this.bargainslist=res.data.data
        })
    },
    methods: {
        span_bargains(){
            window.history.back()
        },
        listedit(item){
            this.$router.push({path:"/bargainlist", query:{id:item.id}})
        }
    },
};
</script>
<style lang="scss">
.div_bargains {
  width: 100%;
  height: 1rem;
  background: goldenrod;
  display: flex;
  align-items: center;
  justify-content: space-around;
  //   position: relative;
  span {
    &:nth-child(1) {
      font-size: 0.5rem;
    }
  }
}
</style>